﻿using RestSharp;
using ServiceStack.Text;
using System;
using System.Collections.Generic;
using System.Web;
using Ymatou.ServiceCenter;
using YmtAuth.AppService;
using YmtAuth.Web.Shard;
using YmtSystem.CrossCutting;

namespace YmtAuth.Web.Handler
{
     
    public class NewUserNotice : IHttpHandler
    {
        public bool IsReusable
        {
            get { return false; }
        }

        [ServiceRegister("newusernotice/handle", Method.GET)]
        public void ProcessRequest(HttpContext context)
        {
            var uVal = context.DeserializeFormString<Dictionary<string, object>>(RequestKey.udata, new Dictionary<string, object> { });
            YmtSystem.CrossCutting.YmatouLoggingService.Debug("request data->{0}", JsonSerializer.SerializeToString(uVal));
            LocalServiceLocator.GetService<IUserBillsAppService>().CreateUserBills(uVal);
            context.ResposeJson(new Dictionary<string, object> { { "Server", "ok" } }, false);
        }
    }
}